//
//  QYXDailyItemListModel.m
//  OpenYourEyes
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Google AdWords. All rights reserved.
//

#import "QYXDailyItemListModel.h"
#import "QYXDailyTagsModel.h"

@implementation QYXDailyItemListModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.des = value;
    }
    
    if ([key isEqualToString:@"playInfo"]) {
        
        NSMutableArray *playArray = [NSMutableArray array];
        for (NSDictionary *dict in value) {
            _playModel = [[QYXDailyPlayInfoModel alloc] init];
            [_playModel setValuesForKeysWithDictionary:dict];
            [playArray addObject:_playModel];
        }
        self.playInfoX = [NSArray arrayWithArray:playArray];
    }
    
}
- (instancetype)initWithDic:(NSDictionary *)dictionary
{
    self = [super initWithDic:dictionary];
    if (self) {
        NSMutableArray *tagArray = [NSMutableArray array];
        for (NSDictionary *dic in _tags) {
            QYXDailyTagsModel *tagModel = [[QYXDailyTagsModel alloc] initWithDic:dic];
            [tagArray addObject:tagModel];
        }
        self.tags = [NSArray arrayWithArray:tagArray];
        
        
        
        
    }
    return self;
}

@end
